using System;

namespace Arcane.Source.Story.StoryEvents
{
    public class DialogEvent : IStoryEvent
    {
        public event Action OnDone;
        private IDialogHandler _handler;

        public void OnBegin(StoryContext context)
        {
            _handler = context.BeginDialog(new Dialog());
            _handler.OnDialogEnd += selections => OnDone?.Invoke();
        }
    }
}